home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / rexx / smacros.lha / FWMacros / Create_Memorandum.arexx < prev    next >
Text File  |  1994-12-17  |  4KB  |  116 lines

  1. /* Create Memorandum
  2. A Macro by Steven. R. Giovenella, 5823 Dutchess Dr., Colorado Springs, CO 80918.
  3. © Copyright 1994 Steven. R. Giovenella, All rights reserved. 
  4. This macro is my gift to the Amiga community.  It may be given away free to 
  5. anyone, but it may NOT be sold in any way, shape, or form, not even for the cost of 
  6. reproduction, downloading, shipping, or handling, without express written 
  7. permission from the author listed above.  Any person or company who violates the 
  8. content of the previous sentence, agrees to pay Steven R. Giovenella $1,000 (US) for 
  9. each copy of this macro sold.  This macro may NOT be added to any disk which is to 
  10. be sold for any price or fee, to include shipping and handling.  The ONLY way this 
  11. macro may be distributed is on a disk which is given away 100% free of all charges, 
  12. or on via telecommunications networks which do not charge any additional fee as a 
  13. result of a user downloading this particular macro.  This macro may only be 
  14. reproduced in its entirety, including all comment lines and code.  The individual 
  15. user may alter this macro for personal use, but may not then distribute the macro 
  16. in any modified form.  If you wish, feel free to send me some cash, a Christmas card, 
  17. some other piece of software, or absolutely nothing as a gift for creating this macro.  
  18. The author of this software is not responsible for any data loss or damage to 
  19. computer equipment as a result, direct or indirect, of the use of this macro. */
  20.  
  21. Options Results
  22.  
  23. /* Warning */
  24. Showmessage 2 0 '"                                   ** WARNING **" "            This Macro will 
  25. alter the current document." "Unless the document is empty, save before proceed
  26. ing." "      Proceed     " "      Save now        " "    Quit    "'
  27.     IF Result = 2 THEN SaveAs
  28.     IF Result = 3 THEN Exit
  29.  
  30. /* Initialize */
  31. Leftoffset = 4.5
  32. toppage = 1.75
  33.  
  34. /* Setup Page */
  35. PageSetup PAGETYPE USLetter ORIENT Tall
  36. SectionSetup TOP .5 BOTTOM 0 INSIDE 1 OUTSIDE 1 HEADER 1.25 FOOTER 1 
  37.  
  38. /* Enter Data */
  39. EnterSenders:
  40. ShowMessage 1 0 '"Creating Memorandum..." " " "   How many senders?" " One " 
  41. "Two " " More "'
  42.     IF Result = 3 THEN RequestText '"Memo" "Enter number of senders..." "3"'
  43.     IF Result < 1 THEN CALL EnterSenders
  44.     senders = Result
  45. DO i = 1 to Result
  46.     RequestText '"Memo" "Name of Sender # 'i'" ""'
  47.     sender.i = Result
  48.     End
  49.  
  50. EnterRecipients:
  51. ShowMessage 1 0 '"Creating Memorandum..." " " "   How many recipients?" " One " 
  52. "Two " " More "'
  53.     IF Result = 3 THEN RequestText '"Memo" "Enter number of recipients..." "3"'
  54.     IF Result < 1 THEN CALL EnterRecipients
  55.     recipients = Result
  56. DO i = 1 to Result
  57.     RequestText '"Memo" "Name of Recipient # 'i'" ""'
  58.     recipient.i = Result
  59.     End
  60.  
  61. RequestText '"Memo" "Subject of Memorandum..." ""' 
  62.     Subject = Result
  63.  
  64. RequestText '"Memo" "Typists initials..." ""' 
  65.     Typist = Result
  66.  
  67. RequestText '"Memo" "Enclosed... (delete text if none)" "ENC:  "' 
  68.     Enc = Result    
  69.  
  70. RequestText '"Memo" "Carbon copy... (delete text if none)" "cc:  "' 
  71.     cc = Result
  72.  
  73. /* Type Data */
  74. MoveToLine 1 0
  75. DO i = 1 to MAX( recipients , senders )
  76.     SetTab .375 Left
  77.     SetTab (leftoffset - .375) Left
  78.     Type "    "
  79.     IF recipients >= i THEN Type recipient.i
  80.     Type "    "
  81.     IF senders >= i THEN Type sender.i
  82.     NewParagraph
  83.     END
  84. NewParagraph
  85. NewParagraph
  86. SetTab .375 Left
  87. SetTab (leftoffset - .375) Left
  88. Type "    "
  89. Type Subject
  90. Type "    "
  91. Insert Date
  92. DO i = 1 to 3
  93.     NewParagraph
  94.     END
  95.  
  96. /* Create Textblocks */
  97. Status FontPath
  98.     fporiginal = Result
  99. Status FontPath 1
  100.     fp = Result || "_bold"
  101. TextBlockTypePrefs SIZE 10 LEADING 12 FONT fp
  102. Status LineHeight
  103.     lh = Result
  104. DrawTextBlock 1 1 (toppage + (.5 * (lh - .125)))  "TO:  "
  105. DrawTextBlock 1 leftoffset (toppage + (.5 * (lh - .125))) "FROM:  "
  106. Offset = ((MAX(senders, recipients) + 2) * lh) + toppage
  107. DrawTextBlock 1 1 (offset + (.5 * (lh - .125))) "RE:  "
  108. DrawTextBlock 1 leftoffset (offset + (.5 * (lh - .125))) "DATE:  "
  109. TextBlockTypePrefs FONT fporiginal
  110. DrawTextBlock 1 1 8.75 Typist
  111. DrawTextBlock 1 1 9.25 Enc
  112. DrawTextBlock 1 1 9.75 cc
  113. SelectObject
  114. Redraw
  115. EditBody
  116.